﻿using Liang.DataBase.Model.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace Liang.DataBase.Mapping.MySql
{
    public class BasicdataMap : EntityTypeConfiguration<sys_basicdata>
    {
        public BasicdataMap()
        {
            // 表名
             ToTable("sys_Basicdata");

            // 主键
            this.HasKey(t => t.basicdataId);

            // 属性特性
            this.Property(t => t.basicdataId)
                .HasColumnName("basicDataId")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.code)
                .HasColumnName("code")
                .HasMaxLength(100)
                .IsRequired();

            this.Property(t => t.des)
                .HasColumnName("des")
                .HasMaxLength(100)
                .IsRequired();
        }
    }
}
